package com.soccertgc.core.game.events 
{
	
	import com.soccertgc.core.game.Game;
	
	public class GameErrorEvent extends GameEvent
	{
		
		// -------------------------------------------------------------------------------
		// FIELDS
		// -------------------------------------------------------------------------------
		
		private var _error:Error;
		
		// -------------------------------------------------------------------------------
		// CONSTRUCTOR
		// -------------------------------------------------------------------------------
		
		/**
		 * Creates a new GameErrorEvent
		 * @param g Game that dispatch the event
		 * @param e Error occoured 
		 */		
		public function GameErrorEvent(g:Game, e:Error)
		{
			super(GameEvent.EVENT_GAME_ERROR, g);
			// Init
			_error = e;
		}
		
		// -------------------------------------------------------------------------------
		// PROPERTIES
		// -------------------------------------------------------------------------------

		public function get error():Error
		{
			return _error;
		}

	}
}